package global

import "github.com/micro/go-micro/v2/config"
import conf "user_api/config"

// GetMysqlFromConsul 获取mysql的配置
func GetRedisFromConsul(config config.Config, path ...string) (*conf.RedisConfig, error) {
	RedisConfig := &conf.RedisConfig{}
	//获取配置
	err := config.Get(path...).Scan(RedisConfig)
	if err != nil {
		return nil, err
	}
	return RedisConfig, nil
}
